<!--
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-07-01 10:15:37
 * @LastEditTime: 2019-11-04 15:18:09
 * @LastEditors: Please set LastEditors
 -->
<template>
  <div class="news">
    <transition name="el-fade-in">
     <el-row type="flex" v-show="show" class="row-container">
      </el-row>
    </transition>
  </div>
</template>

<script>
import {publicNewsDetail} from '@f/public'
export default {
    name: 'news',
     data() {
      return {
        newsInfo: {},
        newsLink: this.$route.query.link,
        show: false
      };
    },
    mounted() {
        this.getNewsInfo()
    },
    methods: {
        getNewsInfo: function(){
            var _this = this;
            console.log(_this.newsLink)
            publicNewsDetail(_this.newsLink)
                .then( (res) => {
                    if(res.data.success) {
                        console.log(res.data)
                        _this.newsInfo = res.data.data;
                    }else{
                        this.$message.error('获取详情失败');
                    }
              })
        }
    }
}
</script>

<style lang='scss' scoped>
  .login{
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    .title{
      text-align: center;
      color: #fff;
    }
    .transition-box {
      margin-bottom: 10px;
      width: 200px;
      height: 100px;
      border-radius: 4px;
      background-color: #409EFF;
      text-align: center;
      color: #fff;
      padding: 40px 20px;
      box-sizing: border-box;
      margin-right: 20px;
    }
  }
  
</style>